const App = getApp()
Page({
  data: {
    orderList: null
  },

  onLoad() {
    App.HttpService.orderList()
      .then(res => {
        this.setData({
          orderList: res.data
        })
      })
  },

  //返回
  onReturn() {
    App.WechatService.redirectTo('/pages/index/index')
  },

  //查看订单详情
  onShowDetail(e) {
    let orderId = e.currentTarget.dataset.orderid
    App.WechatService.redirectTo('/pages/orderDetail/index?orderId=' + orderId)
  }
})